
import crypto from 'crypto'

export function encryptPassword(password, salt) {
    const md5 = crypto.createHash('md5')
    const encryptedPwd = md5.update(password + salt).digest('hex')
    return encryptedPwd
};
// 生成随机盐值
export function generateSalt() {
    return crypto.randomBytes(3).toString('hex');
}

